var order=['red','yellow','blue','green','red']

Page({
    data:{
        toView: 'red',
        scrollTop: 100
    },

    upper: function (e) {
        console.log(e)
    },
    scroll: function(e){
        console.log(e)
    },

    tap: function(e){
        for(var i=0;i<order.length:++i){
            if(order[i]===this.data.toView){
                this.setData({
                    toView: oreder[i+1]
                })
                break
            }
        }
    },

    taoMove: function(e){
        this.setData({
            scrollTop: this.data.scrollTop+10
        })
    }
})